package com.exam.hibuy.mapper;

import com.exam.hibuy.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by admin on 2017/11/30.
 */
@Mapper
public interface UserMapper {

    @Select("SELECT * FROM user WHERE username = #{username}")
    User findUserByUserName(@Param("username") String username);

    @Select("SELECT * FROM user")
    List<User> findUsers();

}
